#ifndef __CANQUEUE_H__
#define __CANQUEUE_H__
#include "stm32f7xx_hal.h"

#define MAX_MESSAGE 64

#pragma pack(1)
typedef struct
{
	uint8_t frameData[MAX_MESSAGE][8];
	uint16_t head;
	uint16_t tail;
	uint32_t frameHead[MAX_MESSAGE];
//	uint32_t packedLength;
}canMessageQue;
#pragma pack()

extern canMessageQue ModuleRcvQue;
extern canMessageQue ModuleSendQue;

extern canMessageQue CHAdeMOMsgQue;

extern void MsgQue_Init(canMessageQue* pQ);
extern uint16_t MsgQue_Count(canMessageQue pQ);
extern uint8_t MsgQue_Push(canMessageQue* pQ, uint32_t canMsgHead, uint8_t *canData);
extern uint8_t MsgQue_Pop(canMessageQue* pQ, uint32_t *canMsgHead, uint8_t *canData);

#endif //__CANQUEUE_H__
